﻿<Window x:Class="XamlTemplateWizard.XamlTemplateChooser"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Xaml Template" Height="300" Width="600"
        xmlns:local="clr-namespace:XamlTemplateWizard"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Loaded="XamlTemplateChooser_Loaded"
        >
    <Window.Resources>
        <Style TargetType="{x:Type local:LabelField}">
            <Setter Property="LabelWidth" Value="110"/>
        </Style>
    </Window.Resources>
    <StackPanel>
        <local:LabelField Header="Namespaces:">
            <ComboBox x:Name="nsCombo"  IsEditable="True" />
        </local:LabelField>
        <local:LabelField Header="Base Type:">
            <ComboBox x:Name="baseTypeCombo"  IsEditable="True" DisplayMemberPath="Name" ItemsSource="{Binding SelectedItem.TypeList,ElementName=nsCombo}"/>
        </local:LabelField>
        <local:LabelField>
            <StackPanel Orientation="Horizontal">
                <Button Content="Save" HorizontalAlignment="Left" Width="100" Margin="2" x:Name="saveButton" Click="saveButton_Click"/>
                <Button Content="Cancel" HorizontalAlignment="Left" Width="100" Margin="2" x:Name="cancelButton" Click="cancelButton_Click"/>
            </StackPanel>
        </local:LabelField>
    </StackPanel>
</Window>
